<ui:composition template="mainTemplate.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets" 
                xmlns:p="http://primefaces.org/ui"
                >

    <ui:define name="content">
        <h:form>
            <p:messages/>
            <h:panelGrid columns="2">
                First name
                <h:inputText value="#{userController.user.firstname}"/>

                Last name
                <h:inputText value="#{userController.user.lastname}"/>

                Email
                <h:inputText value="#{userController.user.email}"/>

                Username
                <h:inputText value="#{userController.user.username}"/>

                Password
                <h:inputSecret value="#{userController.user.password}"/>
            </h:panelGrid>    
            <h:commandButton id="submit" type="submit" value="Register" action="#{userController.attemptRegister()}"/>
        </h:form>
        <h:messages />
        <br/>
        Already have an account? <h:link outcome="pretty:login">Login</h:link>
    </ui:define>
</ui:composition>